gtkmain: Fix build on Windows
authorChun-wei Fan <fanchunwei@src.gnome.org>
Fri, 20 Jan 2017 10:38:53 +0000 (18:38 +0800)
committerChun-wei Fan <fanchunwei@src.gnome.org>
Fri, 20 Jan 2017 11:50:02 +0000 (19:50 +0800)
gtk_init() removed its support for supporting arguments, so we ought to do
likewise for Windows, which actually defines items that call gtk_init()
the old way (and also get rid of argument support in those functions,
since the direction is to not support them).

https://bugzilla.gnome.org/show_bug.cgi?id=773299

gtk/gtkmain.c
gtk/gtkmain.h

index 6aaee9e287fd25ad2167731633ffb742c5e10536..a64e98f6a6c380e6bd912f5bd942a4e89796da3f 100644 (file)
@@ -875,21 +875,21 @@ check_sizeof_GtkBox (size_t sizeof_GtkBox)
  * in the number of extra args.
  */
 void
-gtk_init_abi_check (int *argc, char ***argv, int num_checks, size_t sizeof_GtkWindow, size_t sizeof_GtkBox)
+gtk_init_abi_check (int num_checks, size_t sizeof_GtkWindow, size_t sizeof_GtkBox)
 {
   check_sizeof_GtkWindow (sizeof_GtkWindow);
   if (num_checks >= 2)
     check_sizeof_GtkBox (sizeof_GtkBox);
-  gtk_init (argc, argv);
+  gtk_init ();
 }
 
 gboolean
-gtk_init_check_abi_check (int *argc, char ***argv, int num_checks, size_t sizeof_GtkWindow, size_t sizeof_GtkBox)
+gtk_init_check_abi_check (int num_checks, size_t sizeof_GtkWindow, size_t sizeof_GtkBox)
 {
   check_sizeof_GtkWindow (sizeof_GtkWindow);
   if (num_checks >= 2)
     check_sizeof_GtkBox (sizeof_GtkBox);
-  return gtk_init_check (argc, argv);
+  return gtk_init_check ();
 }
 
 #endif
index c9e660a5b6d1e3e271fa6f5b5b7b587a0237524a..49e19c9f224ae689100be5de1edd3d113e25f865 100644 (file)
@@ -84,20 +84,16 @@ gboolean gtk_init_check           (void);
  * when building GTK+-using code.
  */
 GDK_AVAILABLE_IN_ALL
-void     gtk_init_abi_check       (int    *argc,
-                                   char ***argv,
-                                   int     num_checks,
+void     gtk_init_abi_check       (int     num_checks,
                                    size_t  sizeof_GtkWindow,
                                    size_t  sizeof_GtkBox);
 GDK_AVAILABLE_IN_ALL
-gboolean gtk_init_check_abi_check (int    *argc,
-                                   char ***argv,
-                                   int     num_checks,
+gboolean gtk_init_check_abi_check (int     num_checks,
                                    size_t  sizeof_GtkWindow,
                                    size_t  sizeof_GtkBox);
 
-#define gtk_init(argc, argv) gtk_init_abi_check (argc, argv, 2, sizeof (GtkWindow), sizeof (GtkBox))
-#define gtk_init_check(argc, argv) gtk_init_check_abi_check (argc, argv, 2, sizeof (GtkWindow), sizeof (GtkBox))
+#define gtk_init() gtk_init_abi_check (2, sizeof (GtkWindow), sizeof (GtkBox))
+#define gtk_init_check() gtk_init_check_abi_check (2, sizeof (GtkWindow), sizeof (GtkBox))
 
 #endif